home *** CD-ROM | disk | FTP | other *** search
/ CD/PC Actual Thematic 7: Programming / CDAT7.iso / demos / VisualAge for Java 2.0 Entry / setup / data1.cab / ide-e / IDE / cache / EQDFAV (.txt) < prev    next >
Encoding:
Java Class File  |  1998-09-16  |  1.6 KB  |  43 lines

  1. package com.sun.java.swing.plaf.metal;
  2.  
  3. import com.sun.java.swing.Icon;
  4. import com.sun.java.swing.plaf.UIResource;
  5. import java.awt.Component;
  6. import java.awt.Graphics;
  7. import java.io.Serializable;
  8.  
  9. class MetalIconFactory$FileChooserUpFolderIcon implements Icon, UIResource, Serializable {
  10.    public void paintIcon(Component c, Graphics g, int x, int y) {
  11.       g.translate(x, y);
  12.       g.setColor(MetalLookAndFeel.getPrimaryControl());
  13.       g.fillRect(3, 5, 12, 9);
  14.       g.setColor(MetalLookAndFeel.getPrimaryControlInfo());
  15.       g.drawLine(1, 6, 1, 14);
  16.       g.drawLine(2, 14, 15, 14);
  17.       g.drawLine(15, 13, 15, 5);
  18.       g.drawLine(2, 5, 9, 5);
  19.       g.drawLine(10, 6, 14, 6);
  20.       g.drawLine(8, 13, 8, 16);
  21.       g.drawLine(8, 9, 8, 9);
  22.       g.drawLine(7, 10, 9, 10);
  23.       g.drawLine(6, 11, 10, 11);
  24.       g.drawLine(5, 12, 11, 12);
  25.       g.setColor(MetalLookAndFeel.getPrimaryControlHighlight());
  26.       g.drawLine(2, 6, 2, 13);
  27.       g.drawLine(3, 6, 9, 6);
  28.       g.drawLine(10, 7, 14, 7);
  29.       g.setColor(MetalLookAndFeel.getPrimaryControlDarkShadow());
  30.       g.drawLine(11, 3, 15, 3);
  31.       g.drawLine(10, 4, 15, 4);
  32.       g.translate(-x, -y);
  33.    }
  34.  
  35.    public int getIconWidth() {
  36.       return 18;
  37.    }
  38.  
  39.    public int getIconHeight() {
  40.       return 18;
  41.    }
  42. }
  43.